package com.easyjava.qingke.project.command.impl;

import com.easyjava.qingke.project.command.SystemCommand;
import com.easyjava.qingke.project.util.ProjectConsole;

public class SelectCommand extends SystemCommand {

	public void excute() {

		ProjectConsole.println("1.查看用户");
		ProjectConsole.println("2.查看项目");
		ProjectConsole.println("3.查看材料");
		ProjectConsole.println("4.查看采购计划");
		ProjectConsole.println("5.查看采购单");
		ProjectConsole.println("6.查看领用单");
		ProjectConsole.println("7.查看入库记录与详情");
		ProjectConsole.println("8.查看出库记录与详情");
		ProjectConsole.println("9.查看文档");

		int id = ProjectConsole.promptInt("请输入想要操作的数字：");
		while (id > 0) {
			if (1==id) {
				dao.selectUser();
				break;
			} else if (2==id) {
				dao.selectProject();
				break;
			} else if (3==id) {
				dao.selectMaterial();
				break;
			} else if (4==id) {
				dao.selectPurchasePlanning();
				ProjectConsole.println();
				dao.selectPurchasePlanML();
				break;
			} else if (5==id) {
				dao.selectPurchaseOrder();
				ProjectConsole.println();
				dao.selectPurchaseOrderML();
				break;
			} else if (6==id) {
				dao.selectCollarSingle();
				ProjectConsole.println();
				dao.selectCollarSingleML();
				break;
			} else if (7==id) {
				dao.selectStorageRecord();
				ProjectConsole.println();
				dao.selectStorageML();
				break;
			} else if (8==id) {
				dao.selectLibraryRecord();
				ProjectConsole.println();
				dao.selectLibraryRecordML();
				break;
			} else if (9==id) {
				dao.selectDocumentRecord();
				break;
			} else {
				ProjectConsole.println("该数字不存在！");
				id = ProjectConsole.promptInt("请重新输入想要操作的数字：");
			}

		}
	}

}
